package com.wyb.fastdfs.controller;

//import org.elasticsearch.search.SearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.wyb.fastdfs.service.FileSearchService;
import com.wyb.fastdfs.vo.SearchParam;
import com.wyb.fastdfs.vo.SearchResult;

/**
 * @Author:wangyibo
 * @Date 2021年8月12日
 * @Version:1.0
 * @Description:检索服务
 */
@RestController
@RequestMapping("/search")
public class SearchController {

	@Autowired
	FileSearchService searchService;

	@GetMapping("/searchFileList")
	public SearchResult searchFileList(SearchParam searchParam) {
		SearchResult result = searchService.search(searchParam);

		return result;
	}

}
